package org.decorator.ex2.eg2;

public class Client {
	public static void main(String[] args) {
		Component c1 = new ConcreteComponent();
		Decorator d1 = new MothPrizeDecorator(c1);
		Decorator d2 = new SumPrizeDecoraror(d1);
		Decorator d3 = new GroupPrizeDecorator(d2);
		
		double zs = d2.calcPrize("张三", null, null);
		System.out.println("-----张三应得奖金为 " + zs);
		
		double ls =d2 .calcPrize("李四", null, null);
		System.out.println("-----李四应得奖金为 " + ls);
		
		double ww = d3.calcPrize("王五", null, null);
		System.out.println("-----王五应得奖金为 " + ww);
	}
}
